<template>
  <div class="v-bottom">
    <div class="vb-item sectionBtn" :class="{active: handleBottomBox.tool.flag}" @click="showVBtm('tool')">
      <i class="amsp el-amsp-gongju"></i><span class="vb-name">工具</span>
    </div>
    <div class="vb-item sectionBtn" :class="{active: handleBottomBox.sixView.flag}" @click="showVBtm('sixView')">
      <i class="amsp el-amsp-shitusanweishitu"></i><span class="vb-name">视图</span>
    </div>
    <div class="vb-item sectionBtn" :class="{active: handleBottomBox.sectionFrom.flag}" @click="showVBtm('sectionFrom')">
      <i class="amsp el-amsp-shitupouqiehe"></i><span class="vb-name">剖视</span>
    </div>
    <div class="vb-item colorBtn" :class="{active: handleBottomBox.colorFrom.flag}" @click="showVBtm('colorFrom')">
      <i class="amsp el-amsp-sepan"></i><span class="vb-name">颜色</span>
    </div>
    <div class="vb-item alphaBtn" :class="{active: handleBottomBox.alphaFrom.flag}" @click="showVBtm('alphaFrom')">
      <i class="amsp el-amsp-toumingdutiaojie2"></i><span class="vb-name">透明度</span>
    </div>
    <div class="vb-item resetBtn" @click="$parent.resetThree()">
      <i class="amsp el-amsp-fuwei"></i><span class="vb-name">复位</span>
    </div>

    
  </div>
</template>

<script>
  
export default {
  components: {
  },
  props: ['handleBottomBox', 'handleLeftBox'],
  data() {
    return {
    }
  },
  computed: {
  },
  created() {},
  mounted() {},

  methods:{
    showVBtm(item){
      console.log(item)
      //点击其他按钮还原属性
      // if(item!='alphaFrom'){
      //   this.$parent.reloadDepthWrite();
      //   this.$parent.render();
      // }else if(item=='alphaFrom'){
      //   this.$parent.changeDepthWrite();
      //   this.$parent.render();
      // }
      for(let a in this.handleBottomBox)
        if (a == item) {
          this.handleBottomBox[a].flag = !this.handleBottomBox[a].flag
          if (!['tool', 'sixView'].includes(item) && !this.handleLeftBox.choseModels.length && this.handleBottomBox[a].flag) {
            this.$message.warning('请勾选模型');
          }
        } else {
          this.handleBottomBox[a].flag = false
        }
    },
  }
}
</script>
<style scoped lang="less">
</style>